var Main={

    openPopup: function(popUp){
        var left=($(window).width()-popUp.width())/2;
        var top=$(window).height()/2+50;

        popUp.attr('style', 'left: '+left+'px; top: -'+top+'px');

        popUp.css('display','block');
        popUp.css('position','relative');

        $('.popup__overlay').css('display','block');
        $('.popup__overlay').css('position','absolute');
    },

    closePopup: function(popUp){
        popUp.css('display','none');
        $('.popup__overlay').css('display','none');
    }

};